package com.by.controller;

import com.by.bean.Dept;
import com.by.bean.Role;
import com.by.common.bean.ResultBean;
import com.by.common.controller.BaseController;
import com.by.mapper.DeptMapper;
import com.by.mapper.RoleMapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api")
@Api(tags = "角色管理")
public class RoleController extends BaseController {
    @Autowired
    private RoleMapper roleMapper;

    // 部门列表
    @ApiOperation("查询部门列表")
    @PostMapping("/role/list")
    public ResultBean query() {
        List<Role> roles = roleMapper.query();
//        return depts;
        return success("客户列表", roles);
    }
}
